Skip to content

Latest commit

 

History

History
88 lines (73 loc) · 1.54 KB

File metadata and controls

88 lines (73 loc) · 1.54 KB

import { HttpStatusCode } from 'solid-start/server'; import { Description, Property, Qwik, SolidPreactOrReact, Title, } from '~/components';

<Title>zodField$</Title> Creates a validation functions that parses the Zod schema of a field.

zodField$

Creates a validation functions that parses the Zod schema of a field.

const validate = zodField$(schema);

Parameters

  • schema <Property {...properties.schema} />

Return

  • validate <Property {...properties.validate} />

This page is exclusively for the Qwik library of Modular Forms.

export const properties = { schema: { type: { type: 'custom', name: 'MaybeFunction', href: '../MaybeFunction', generics: [ { type: 'custom', name: 'ZodType', generics: [ 'any', 'any', { type: 'custom', name: 'FieldValue', href: '../FieldValue', }, ], }, ], }, }, validate: { type: { type: 'custom', name: 'QRL', generics: [ { type: 'function', params: [ { name: 'value', type: { type: 'custom', name: 'FieldValue', href: '../FieldValue', }, }, ], return: 'string', }, ], }, }, };